<template>
  <div>
    <table width="50%">
      <tr>
        <th colspan="7" align="center" class="b_title">一、减税项目</th>
      </tr>
      <tr>
        <td  align="center" class="b_title" style="width:24%">减免性质及代码名称</td>
        <td  align="center" class="b_title" style="width:6%">栏次</td>
        <td align="center" class="b_title" style="width:14%">期初余额</td>
        <td align="center" class="b_title" style="width:14%">本期发生额</td>
        <td align="center" class="b_title" style="width:14%">本期应抵减税额</td>
        <td align="center" class="b_title" style="width:14%">本期实际抵减税额</td>
        <td align="center" class="b_title" style="width:14%">期末余额</td>
      </tr>
      <tr>
        <td width="24%">
          <a-select style="width: 100%" v-model="obj.name" @change="handleChange">
            <a-select-option v-for="item in list" :item="item" :key="item.id" :value="item.name">
              {{ item.name }}
            </a-select-option>
          </a-select>
        </td>
      </tr>
    </table>
    <a-row>
      <a-col :span="2">
        <a-select style="width: 100%" v-model="obj.name" @change="handleChange">
          <a-select-option v-for="item in list" :item="item" :key="item.id" :value="item.name">
            {{ item.name }}
          </a-select-option>
        </a-select>
      </a-col>

    </a-row>
    <p>{{list}}</p>
          
  </div>
</template>
<script>
export default {
  props: {
    obj:"",
    list:{
      type:Array
    },
  },
  model: {
    prop: "obj",
    event: "select",
  },
  data() {
    return {};
  },
  methods: {
    handleChange(value, e) {
      // debugger

      // this.obj.value=e.data.attrs.item.value
      this.obj.vale=e.data.attrs.item.vale
      console.log(this.obj)
      this.$emit('select',this.obj)
      // console.log(`selected ${value}`);
      // console.log(e);
    },
  },
};
</script>
<style scoped>
table{
  table-layout: fixed;
}
</style>
